import createApp from "./main";
const { app, router } = createApp();

router.isReady().then(() => {
  app.mount("#app", true); // true表示服务端渲染

  // 开发模式下启用 Pinia 状态热更新
  if (import.meta.hot) {
    import.meta.hot.accept("./store/count", () => {
      const newStore = useCounterStore();
      newStore.$patch(pinia.state.value.counter);
    });
  }
});
